package com.ruoyi.procured.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * ${subTable.functionName}对象 tb_procured_product
 * 
 * @author ruoyi
 * @date 2023-11-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class TbProcuredProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 产品编号 */
    @Excel(name = "产品编号")
    private String proNo;

    /** SKU */
    @Excel(name = "SKU")
    private String sku;

    /** 产品名称 */
    @Excel(name = "产品名称")
    private String productName;

    /** 产品图片 */
    @Excel(name = "产品图片")
    private List<String> imgName;

    /** 产品价格 */
    @Excel(name = "产品价格")
    private BigDecimal productPrice;

    /** 数量 */
    @Excel(name = "数量")
    private Long number;

    /** 已转数量 */
    @Excel(name = "已转数量")
    private Long turnedNumber;

    /** 可转数量 */
    @Excel(name = "可转数量")
    private Long transferableNumber;

    /** 金额 */
    private BigDecimal amount;

    /** 税率 */
    private String rate;

    /** 税额 */
    private BigDecimal tax;

    /** 含税金额 */
    private BigDecimal taxIncluded;

    /** 备注 */
    @Excel(name = "备注")
    private String productRemark;

    /** 备注 */
    @Excel(name = "版本号")
    private Integer version;

    /** 关联采购计划表(tb_purchase_plan) */
    private Long planId;

    /** 删除状态 0存在1删除 */
    private String deleteStatus;

    /** 原采购数量 */
    private Integer originalPurchaseQuantity;

    /**
     * 是否全部退货或者退款完毕（0：否, 1：是
     */
    private Integer returnCompletedStatus;

    /** 是否选择状态 */
    private String selectedStatus;

    /** 产品id */
    private Long productId;

    /**
     * 供应商属性
     */
    private Integer supplierType;

    /**
     * 供应商名称
     */
    private String vendorName;

    /**
     * 供应商id
     */
    private Integer vendorId;

    /**
     * 交付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryTime;

    /**
     * 货币单位
     */
    private Integer monetaryId;

    /**
     * 汇率
     */
    private BigDecimal currency;

    /**
     * 是否是供应商付
     */
    private Boolean flag;

    /**
     * 运费
     */
    private BigDecimal freight;

    /**
     * 1688订单号
     */
    private String orderNo1688;

    /**
     * GTIN
     */
    private String gtin;

    /**
     * 销售计划明细id
     */
    private String shipmentsId;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("proNo", getProNo())
                .append("productName", getProductName())
                .append("productPrice", getProductPrice())
                .append("number", getNumber())
                .append("turnedNumber", getTurnedNumber())
                .append("transferableNumber", getTransferableNumber())
                .append("amount", getAmount())
                .append("rate", getRate())
                .append("tax", getTax())
                .append("taxIncluded", getTaxIncluded())
                .append("productRemark", getProductRemark())
                .append("planId", getPlanId())
                .append("deleteStatus", getDeleteStatus())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("selectedStatus",getSelectedStatus())
                .append("proNo",getProNo())
                .toString();
    }
}
